<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>v_model绑定select</title>
</head>
<body>
  <div id="app">
    <!--1. select的单选-->
    <select v-model="fruit"> <!--要绑定在select里面-->
      <option value="apple">苹果</option>
      <option value="orange">橘子</option>
      <option value="banana">香蕉</option>
    </select>
    <h2>单选: {{fruit}}</h2>
    <hr>
    <!--1. select的多选  需要使用Ctrl键进行多选-->
    <select multiple size="3" v-model="fruits">
      <option value="apple">苹果</option>
      <option value="orange">橘子</option>
      <option value="banana">香蕉</option>
    </select>
    <h2>多选: {{fruits}}</h2>
  </div>
  
  <script src="../lib/vue.js"></script>
  <script>
    // 使用vue
    const app = Vue.createApp({
      data: function(){
        return {
          fruit: "",
          fruits: []
        }
      }
      ,methods: {
      },
      computed: {
        
      },
      watch: {
       
      }
    }
    )
    // 挂载 
    app.mount("#app")
  </script>

</body>
</html>
